From: Florian Müllner Date: Wed, 31 Jan 2024 15:16:04 +0000 (+0100) Subject: dbusService: Don't double-wrap remote errors X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~281^2~2^2~53 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=a5d33026f02d7b0e3fed7b9cfdb54ecedbd15eca;p=gnome-shell.git dbusService: Don't double-wrap remote errors Returning a GLib.Error from a method invocation will encode the error when sent over the wire. In case the error itself is already an encoded remote error, just passing it on will result in double wrapping. Avoid that by stripping any remote error information before returning it. Part-of: --- diff --git a/js/dbusServices/dbusService.js b/js/dbusServices/dbusService.js index 422ef60e2..ab7af9291 100644 --- a/js/dbusServices/dbusService.js +++ b/js/dbusServices/dbusService.js @@ -75,6 +75,7 @@ export class ServiceImplementation { return false; if (error instanceof GLib.Error) { + Gio.DBusError.strip_remote_error(error); invocation.return_gerror(error); } else { let name = error.name;